﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class morenews : System.Web.UI.Page
{
    public string MuneType = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        string newType = CDataCrypt.DecryptDES(Request.QueryString["newType"].ToString(),CDataCrypt.KeyValue);
        if (newType == "1")
        {
            MuneType = "体育公告";
        }
        else if (newType == "2")
        {
            MuneType = "教学动态";
        }
        else if (newType == "3")
        {
            MuneType = "体育新闻";
        }
        else if (newType == "4")
        {
            MuneType = "考试新闻";
        }
        Page.Header.Title = MuneType + "===浙江树人大学网上文体教室";
        if (!IsPostBack)
        {
            AspNetPager1.RecordCount = SQL.ExecScalar("select count(*) from wtnews where wtnewsType='" + MuneType + "'");
            AspNetPager1.PageSize = 22;

            PageData.bindData(Repeater1, "select * from wtnews  where wtnewsType='" + MuneType + "' order by pkID desc", "wtnews", AspNetPager1);
        }
    }
    protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
    {
        AspNetPager1.CurrentPageIndex = e.NewPageIndex;
        PageData.bindData(Repeater1, "select * from wtnews  where wtnewsType='" + MuneType + "' order by pkID desc", "wtnews", AspNetPager1);
    }
}
